package com.zjut.azhen.DBDesign.service;

import com.zjut.azhen.DBDesign.bean.Students;
import com.zjut.azhen.DBDesign.mapping.StudentsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentsService {
    @Autowired
    StudentsMapper studentsMapper;
    public List<Students> getAll(){
        return studentsMapper.getAll();
    }
    public Integer updateStuById(Students students){

        return studentsMapper.updateStu(students);
    }
    public Integer insertStu(Students students){
        return studentsMapper.insertStu(students);
    }

    public Integer deleteStudentById(String id){
        return studentsMapper.deleteStuByid(id);
    }

    public Students getStuById(String id){return studentsMapper.getStuById(id);}
}
